import request from '@/utils/request'

export function sendEmail() {
  return request({
    url: '/system/urge/sendemail',
    method: 'get'
  })
}

// 根据楼栋编号查询费用催缴列表
export function chargeByBuildCode(query) {
  return request({
    url: '/zxwy/chargedata/listbycode',
    method: 'get',
    params: query
  })
}

// 根据商业区ID查询费用催缴列表
export function chargeByDTId(id) {
  return request({
    url: '/zxwy/chargedata/listbyDTId/'+ id,
    method: 'get',
  })
}

// 根据楼栋ID查询费用催缴列表
export function chargeByBuildId(id) {
  return request({
    url: '/zxwy/chargedata/listbybuildId/'+ id,
    method: 'get',
  })
}

// 查询全部费用催缴列表
export function chargeList(query) {
  return request({
    url: '/zxwy/chargedata/list',
    method: 'get',
    params: query
  })
}

// 查询费用催缴列表
export function listUrge(query) {
  return request({
    url: '/system/downtown/list',
    method: 'get',
    // params: query
  })
}


// 查询费用催缴详细
export function getUrge(id) {
  return request({
    url: '/system/urge/' + id,
    method: 'get'
  })
}

// 新增费用催缴
export function addUrge(data) {
  return request({
    url: '/system/urge',
    method: 'post',
    data: data
  })
}

// 修改费用催缴
export function updateUrge(data) {
  return request({
    url: '/system/urge',
    method: 'put',
    data: data
  })
}

// 删除费用催缴
export function delUrge(id) {
  return request({
    url: '/system/urge/' + id,
    method: 'delete'
  })
}
